﻿using System;

namespace InstantMessenger.Transports
{
    [Serializable]
    public class TwitterContact
    {
        public TwitterContact()
        {
        }

        public TwitterContact(string name, string twitterUserName) : this(name, twitterUserName, string.Empty, string.Empty)
        {
        }

        public TwitterContact(string name, string twitterUserName, string accessToken, string accessTokenSecret)
        {
            Name = name;
            TwitterUserName = twitterUserName;
            AccessToken = accessToken;
            AccessTokenSecret = accessTokenSecret;
        }

        public string Name { get; set; }

        public string TwitterUserName { get; set; }

        public long LastDirectMessageId { get; set; }

        public string AccessToken { get; set; }

        public string AccessTokenSecret { get; set; }

        public bool CanRead
        {
            get { return !string.IsNullOrEmpty(AccessToken) && !string.IsNullOrEmpty(AccessTokenSecret); }
        }

        public bool IsAuthorised
        {
            get { return CanRead; }
        }
    }
}